Learn Loops in Software Testing